{% extends "myadmin/base.html" %} {% block mainbody %}
<h3>
        商品信息管理
    </h3>
<form id="edit-profile" action="{% url 'myadmin_goods_insert' %}" class="form-horizontal" method="post" enctype="multipart/form-data">
    {% csrf_token %}
    <fieldset>
        <legend>添加商品信息</legend>
        <div class="control-group">
            <label class="control-label" for="input01">商品类别：</label>
            <div class="controls">
                <select name="typeid">
                    {% for vo in typelist %}
                    <option {% if vo.pid == 0 %} disabled {% endif %} value="{{ vo.id }}">{{ vo.name }}</option>
                    {% endfor %}
                </select>
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="input01">商品名称：</label>
            <div class="controls">
                <input type="text" name="goods" class="input-xlarge" id="input01" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="input01">生产厂家：</label>
            <div class="controls">
                <input type="text" name="company" class="input-xlarge" id="input01" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="input01">单价：</label>
            <div class="controls">
                <input type="text" name="price" class="input-xlarge" id="input01" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="input01">库存量：</label>
            <div class="controls">
                <input type="text" name="store" class="input-xlarge" id="input01" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="input01">商品图片：</label>
            <div class="controls">
                <input type="file" name="pic" class="input-xlarge" id="input01" />
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="input01">商品简介：</label>
            <div class="controls">
                <textarea cols="40" style="width:450px" rows="10" name="content">
                </textarea>
            </div>
        </div>
        <div class="form-actions">
            <button type="submit" class="btn btn-primary">添加</button>
            <button type="reset" class="btn">重置</button>
        </div>
    </fieldset>
</form>
{% endblock %}